package leetcode.code1470;

import leetcode.IDebug;
import leetcode.helper.H;

public class Solution implements IDebug {

	public int[] shuffle(int[] nums, int n) {
		int len = nums.length;
		int ans[] = new int[len];
		for (int i = 0, l = 0, r = n, p = 0; i < n; i++) {
			ans[p++] = nums[l++];
			ans[p++] = nums[r++];
		}
		return ans;
	}

	@Override
	public void debug4() {
		H.compare(H.str2array3("[2,3,5,4,1,7]"), this.shuffle(H.str2array3("[2,5,1,3,4,7]"), 3));

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug1() {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		Solution so = new Solution();
		so.debug1();
		so.debug2();
		so.debug3();
		so.debug4();

	}

}
